package com.data.datalib.http

import java.util.concurrent.CompletableFuture

class ASRequestManager(val url: String, val body: String, val taskId: String) {

    fun doPost() {
        if (this.url.isBlank() or this.body.isBlank()) return

        val task = ASPostAsyncTask(url = url, body = body, taskId = taskId)
        val supplier = CompletableFuture.supplyAsync(task)
        val allOfFuture = CompletableFuture.allOf(supplier)
        allOfFuture.thenRunAsync { }
    }
}